import java.util.Scanner;
public class Demo4 {
	public static void main(String[]args) {
		Scanner abc=new Scanner(System.in);
		int a =abc.nextInt();
		int b=0;
		int c=1;
		int d=0;
		for (int i=1;i<=a;i++) {
			for(int j=1;j<=i;j++) {
				b=j;
			}
			c=b*c;
			d=d+c;
		}
		System.out.print(d);
		
}
	
}